module GLSLProgramLogic;
import renderers.GLSLModel;
import framework.Events;
import frontend.Parser;
import std.c.stdlib;
import derelict.sdl.sdl;

class ProgramLogic{
	ModelRenderer modelRender;
	
	this(){
		modelRender=new ModelRenderer( loadModel("models/juddy.dmc"));
		eventPooler.register(&this.getKey);
		modelRender.set(ModelRendererFunc.RenderSkinned);
	}
	
	void getKey(SDL_KeyboardEvent k){
		if(k.type==SDL_KEYDOWN){
			switch(k.keysym.sym){
				/+case SDLK_0: modelRender.set(ModelRendererFunc.RenderNothing); break;
				case SDLK_1: modelRender.set(ModelRendererFunc.RenderNotSkinned); break;
				case SDLK_2: modelRender.set(ModelRendererFunc.RenderBones); break;
				case SDLK_3: modelRender.set(ModelRendererFunc.RenderSkinned); break;+/
				case SDLK_ESCAPE: exit(0); break;
				default: break;
			}		
		} 
	}}